<?php /* Smarty version Smarty-3.1.8, created on 2012-05-20 13:12:30
         compiled from "application/views/templates\user\track.tpl" */ ?>
<?php /*%%SmartyHeaderCode:293084fb6b959a9ae04-55037686%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ba60cf62f9f1cea6cfcb15dac79c91f38a1e07a7' => 
    array (
      0 => 'application/views/templates\\user\\track.tpl',
      1 => 1337501266,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '293084fb6b959a9ae04-55037686',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_4fb6b959bd3df1_07146749',
  'variables' => 
  array (
    'username' => 0,
    'geo_info' => 0,
    'k' => 0,
    'row' => 0,
    'start_long' => 0,
    'start_lat' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_4fb6b959bd3df1_07146749')) {function content_4fb6b959bd3df1_07146749($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'D:\\wamp\\www\\tourini\\system\\libs\\smarty\\libs\\plugins\\modifier.date_format.php';
?><div class="round-corner white">
	<div style="margin:30px" />
	
	<div id= "send_form" >
 			 <table>
			 <tr>
			 <td width="50%">
				<div id='map' style='width:600px;height:600px'></div>
			</td>
			<td width="50%">
				<h3> Tracking On @<?php echo $_smarty_tpl->tpl_vars['username']->value;?>
</h3>
				<ul>
				<?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['geo_info']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){
$_smarty_tpl->tpl_vars['row']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['row']->key;
?> 
				<li>
				<p>
				<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['k']->value,"%D %H:%M:%S");?>
:
				
				<a href='#' onClick='movemap(<?php echo $_smarty_tpl->tpl_vars['row']->value['l_longtitude'];?>
,<?php echo $_smarty_tpl->tpl_vars['row']->value['l_latitude'];?>
);'><?php echo $_smarty_tpl->tpl_vars['row']->value['l_name'];?>
</a>
				<?php if ($_smarty_tpl->tpl_vars['row']->value['type']=="checkin"){?> Check in<?php }?>
				<?php if ($_smarty_tpl->tpl_vars['row']->value['type']=="photo"){?> Take a photo<?php }?>
				<?php if ($_smarty_tpl->tpl_vars['row']->value['type']=="message"){?> Post a message<?php }?>
				</p>
				</li>
				<?php } ?>
				</ul>
			</td>
			</tr>
			</table>
				
			</div>
			 <div class="form-actions">
					<input type="button" class="btn" onclick="javascrpt:close_reg_form()" value="Close"></input>
					</div>
		 
 	</div>
</div>

<script>
	//<![CDATA[
		var map;
		onLoad();
		function onLoad() 
		{

			if (GBrowserIsCompatible()) 
			{
					 

					map = new GMap(document.getElementById("map"));
					map.centerAndZoom(new GPoint(<?php echo $_smarty_tpl->tpl_vars['start_long']->value;?>
,<?php echo $_smarty_tpl->tpl_vars['start_lat']->value;?>
), 0);
					var route = [];
					<?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['geo_info']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){
$_smarty_tpl->tpl_vars['row']->_loop = true;
 $_smarty_tpl->tpl_vars['val']->value = $_smarty_tpl->tpl_vars['row']->key;
?> 
			 
					addmarker(<?php echo $_smarty_tpl->tpl_vars['row']->value['l_longtitude'];?>
,<?php echo $_smarty_tpl->tpl_vars['row']->value['l_latitude'];?>
);
					 
					
					route.push(new GPoint(<?php echo $_smarty_tpl->tpl_vars['row']->value['l_longtitude'];?>
,<?php echo $_smarty_tpl->tpl_vars['row']->value['l_latitude'];?>
 ));
					 
					<?php } ?>
					map.addOverlay(new GPolyline(route));

			}
		}

		function movemap(x,y) 
		{
			map.recenterOrPanToLatLng(new GPoint(parseFloat(x),parseFloat(y)));
		}
		function addmarker(x,y) 
		{
			var point = new GPoint(parseFloat(x),parseFloat(y));
			map.addOverlay(new GMarker(point));
		}
	//]]>
		
</script><?php }} ?>